#if !defined(AFX_3DTRACKBALLVIEW_H__84B92F45_816B_4D1D_84B2_0C5B4134513D__INCLUDED_)
#define AFX_3DTRACKBALLVIEW_H__84B92F45_816B_4D1D_84B2_0C5B4134513D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "3DArcBallCam.h"
#include "Vector2f.h"
#include "Timer.h"

// 3DTrackBallView.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// C3DArcBallView view

class C3DArcBallView : public COpenGLView
{
protected:
	C3DArcBallView();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(C3DArcBallView)

// Attributes
public:
	CTerrainEditorDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(C3DArcBallView)
	protected:
	virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
	//}}AFX_VIRTUAL

	void VirtualOnCreate();
	void VirtualOnDraw();
	void VirtualOnSize(int width, int height);

// Member variables
public:
	C3DArcBallCam m_3DCam;
	CTimer m_Timer;
	bool m_bMouseLBDown;
	bool m_bWireframeMode;
	bool m_bShowTextures, m_bShowNormals;
	vector2f m_vMouseFromPos, m_vMouseToPos;

private:
	HCURSOR m_hMouseCursor;

protected:
	virtual ~C3DArcBallView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
protected:
	//{{AFX_MSG(C3DArcBallView)
	afx_msg void OnMenuItemOpenGLInfo();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnMenuItemMeshProperties();
	afx_msg void OnMenuItemWireframeMode();
	afx_msg void OnMenuItemShowTextures();
	afx_msg void OnMenuItemShowNormals();
	afx_msg void OnUpdateMenuItemWireframeMode(CCmdUI* pCmdUI);
	afx_msg void OnUpdateMenuItemShowTextures(CCmdUI* pCmdUI);
	afx_msg void OnUpdateMenuItemShowNormals(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in C3DArcBallView.cpp
inline CTerrainEditorDoc* C3DArcBallView::GetDocument()
   { return (CTerrainEditorDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_3DTRACKBALLVIEW_H__84B92F45_816B_4D1D_84B2_0C5B4134513D__INCLUDED_)
